/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simple;

import algorithm.Environment;
import algorithm.GenerationReport;
import algorithm.Individual;
import algorithm.Population;

/**
 *
 * @author vermaak
 */
public class LogGenerationReport implements GenerationReport {

    public void write(Population population, Environment environment) {
        String ret = new String("Pop: ");
        population.sort(environment);
        Individual best = population.getIndividual(0);
        try {
            ret += "best: " + best.getFitness(environment);
            ret += " pheno: " + best.getPhenotype(environment);
        } catch (Exception e) {

        }
        System.out.println(ret);
    }
}
